<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>直推奖励</title>
    <script src="__INDEX__/js/mui.min.js"></script>
	<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
	<link rel="stylesheet" href="__INDEX__/css/style.css" />
	<link rel="stylesheet" href="__INDEX__/css/mall.css" />	
	<script type="text/javascript" src="__INDEX__/dist/jquery.min.js" ></script>
	<script type="text/javascript" src="__INDEX__/js/menudown.js" ></script>
</head>
<body>
	<div class="mui-content">
	    {include file="public/city" /}
	     <div class="glj_bt"><span class="mui-icon iconfont icon-dingdan4" style="font-size: .9rem;"></span><em style="padding-left: 20px;">直推奖励金发放</em><em style="float:right">累计发放总额:{$jljze?$jljze : 0.00}</em></div>
	     <div class="my_orders"></div>
	     <div class="glj_bt"><em>直推奖励发放人数</em><em style="float:right">累积发放人数:{$jljrs?$jljrs : 0}人</em></div>
	     <div class="glj_bt"><em>已发放直推奖励</em><em style="float:right">累积已发放奖励:{$jljze?$jljze : 0.00}</em></div>
	     <div class="glj_bt"><em>待发放直推奖励</em><em style="float:right">累积待发放奖励:{$dffsum?$dffsum : 0.00}</em></div>
	     <div class="glj_bt"><em>今日发放直推奖励人数</em><em style="float:right">人数:{$jljrsd?$jljrsd : 0}人</em></div>
	     <div class="glj_bt"><em>今日发放直推奖励金额</em><em style="float:right">累积金额:{$jljzed?$jljzed : 0.00}</em></div>
	     <div class="my_orders"></div>
	     <div class="glj_bt" style="text-align: left;">直推奖励发放明细列表</div>
	     <div class="glj_bt1"><input style="font-size:12px;width:200px;height: 30px;line-height: 30px;border-radius: 15px;" id="name" type="text" placeholder="搜索姓名、手机号、会员编号"/>	    
	     <em style="padding-left: 20px;"></em><a href="#" onclick="find()">搜索</a></div>
	   <ul class="record_list2">
	    	<li class="clearfix">
	    		<div class="pj">会员姓名</div>
	    		<div class="pj">直推产品</div>
	    		<div class="pj">直推奖励</div>
	    		<div class="pj">奖励状态</div>
	    		<div class="pj1">奖励时间</div>
    		</li>
	    </ul>
	    <ul class="record_list2 list">
			
	    </ul>
		<p id="no_record" style="color:#D6AA50;text-align: center;display: none;">数据已加载完毕</p>
	  
	</div>
	<input type="hidden" id="page" value="1" />
			{include file="public/bottom" /}
</body>
</html>
	{include file="public/footer" /}
<script src="__PUBLIC__/static/js/mui.min.js"></script>
<script>
	function find(){
		get_data();
	}
	get_data();
	function get_data(){
			$.ajax({
			type:"post",
			data:{
				name:$("#name").val(),
				page:$("#page").val()
			},
			url:"{:url('index/city/ztyjff')}",
			success:function(data){	
				var list=data.list;
				var html="";
				if(list&&list.length>0){
					for(var i=0;i<list.length;i++){
						var log=list[i];
						var typename = '';
						html+='<li class="clearfix">'+
				    		'<div class="pj">'+log.nick_name+'</div>'+
				    		'<div class="pj">会员</div>'+
				    		'<div class="pj">￥'+log.balance+'</div>'+
				    		'<div class="pj">成功</div>'+
				    		'<div class="pj1">'+log.add_time+'</div>'+
			    			'</li>';
					}
				}else{
					$("#no_record").show();
				}
				$(".list").html(html);
				
			}
		});
	}
	$(window).scroll(function(){
		var scrollTop = $(window).scrollTop();       //滚动条高度
		var bodyheight = $(document).height();         //文档的高度
		var windowheight = window.innerHeight;	//$(window).height();              //当前窗体的高度
		if((bodyheight - windowheight - scrollTop) == 0){
			$.ajax({
			type:"post",
			data:{
				name:$("#name").val(),
				page:parseFloat($("#page").val())+1
			},
			url:"{:url('index/city/ztyjff')}",
			success:function(data){	
				var list=data.list;
				var html="";
				if(list&&list.length>0){
					$("#page").val(parseFloat($("#page").val())+1);
					for(var i=0;i<list.length;i++){
						var log=list[i];
						html+='<li class="clearfix">'+
				    		'<div class="pj">'+log.nick_name+'</div>'+
				    		'<div class="pj">会员</div>'+
				    		'<div class="pj">￥'+log.balance+'</div>'+
				    		'<div class="pj">成功</div>'+
				    		'<div class="pj1">'+log.add_time+'</div>'+
			    			'</li>';
					}
				}else{
					$("#no_record").show();
				}
				$(".list").append(html);
				
			}
		});
		
		}				
	})
	
</script>
